﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RazorTs.TemplateAxios
{
    public class TemplateInterface
    {
        public static string Template = @" 
                                         /** @Model.ClassDescribe */ @(';') export    interface   @Model.ClassName { 
                                              @foreach (var item in Model.ModelPropertyDescribes)
                                              {
                                                      @('/')@('*')@('*')  @item.PropertyDescribe @('*')@('/')  @(';') @item.PropertyName if(@item.IsNull){@('?')}else{}  @(':') @item.PropertyType @(';') 
                                              }
                                            }
                                              ";

        public static string TemplateTwo = @"
@if(!string.IsNullOrEmpty(@Model.ClassDescribe)){
<text>/**
 * @Model.ClassDescribe     
 */</text>
}else{}
export interface @Model.ClassName {
    @foreach (var item in Model.ModelPropertyDescribes){ 
if(!string.IsNullOrEmpty(@item.PropertyDescribe)){
  <text>/**
   * @item.PropertyDescribe</text>
   <text>*/</text>
}else{}
  <text>@item.PropertyName</text><text>@if(@item.IsNull){@('?')}else{}@(':') @item.PropertyType</text>
    }
}
";
           

    }
}
